﻿using System.Collections.Generic;

namespace Chimp.Core
{
    public class xConstantFloat : ChimpFXNode
    {
        public xConstantFloat()
            : base("ConstantFloat", EffectNodeType.Constant)
        {
            PropFloatValue = 0.0f;
            AddOut(EffectParameterType.Float, "ConstantValue", "Constant Float Value");
        }

        public float PropFloatValue { get; set; }

        public override ChimpFXNode CreateNew()
        {
            return new xConstantFloat();
        }

        public override void ProduceSegment(List<ChimpEffectPar> pars)
        {
            ChimpFX.Code("const float " + PropNodeName + "_" + Out[0].ID + " = " + PropFloatValue + ";");
        }
    }
}